<!DOCTYPE HTML>
<html>
	 <head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8">
		<title>订单详情</title>
		<script src="__JQ__/jquery.js"></script>
		<link rel="stylesheet" href="__JQ__/jqueryUI/jquery-ui.theme.min.css">
		<script src="__JQ__/jqueryUI/jquery-ui.min.js"></script>
		<script type="text/javascript" src="__JQ__/admin-js.js"></script>
		<style>
		.msg{background-color:#1C86EE;width:200px;height:30px;position:absolute;left:50%;margin-left:-100px;border-radius:8px;display:none;color:white}
		</style>
		<script>
		$(function() {
			setTimeout("changeDivStyle();", 100); // 0.1秒后展示结果，因为HTML加载顺序，先加载脚本+样式，再加载body内容。所以加个延时
		});
		function changeDivStyle(){
			var o_status = $("#o_status").val();	//获取隐藏框值
			if(o_status==2){
				$('#check').css('background', '#DD0000');
				$('#checkText').css('color', '#DD0000');
			}else if(o_status==1){
				$('#complete').css('background', '#DD0000');
				$('#completeText').css('color', '#DD0000');
			}else if(o_status==3){
				$('#cancel').css('background', '#DD0000');
				$('#cancelText').css('color', '#DD0000');
			}
			}else if(o_status==4){
				$('#huifucomplete').css('background', '#DD0000');
				$('#huifucompleteText').css('color', '#DD0000');
			}
			
		}
		</script>
		<style type="text/css">
		*{list-style-type:none;}
		a,img{border:0;}
		.stepInfo{background:#f2f2f2;font:12px/180% Arial, Helvetica, sans-serif, "新宋体";}
		.stepInfo{position:relative;margin-bottom:30px;background:#f2f2f2;margin:20px auto 0 auto;width:800px;}
		.stepInfo li{float:left;width:48%;height:0.15em;background:#bbb;}
		.stepIco{border-radius:1em;padding:0.03em;background:#bbb;text-align:center;line-height:1.5em;color:#fff; position:absolute;width:1.4em;height:1.4em;}
		.stepIco1{top:-0.7em;left:50%;}
		.stepIco2{top:-0.7em;left:60%;}
		.stepIco3{top:-0.7em;left:70%;}
		.stepIco4{top:-0.7em;left:80%;}
		.stepIco5{top:-0.7em;left:90%;}
		.stepText{color:#666;margin-top:0.2em;width:4em;text-align:center;margin-left:-1.4em;}
		</style>
	</head>
<body>
<div class="msg" align="center"></div>
		<input type="hidden" value="<{$vo.review}>" id="o_status" />
			<div class="stepInfo">
				<ul>
					<li></li>
					<li></li>
				</ul>
				<div class="stepIco stepIco1" id="create">1
					<div class="stepText" id="createText">创建评论</div>
				</div>
				<div class="stepIco stepIco2" id="check">2
					<div class="stepText" id="checkText">审核评论</div>
				</div>
				<div class="stepIco stepIco3" id="complete">3
					<div class="stepText" id="completeText">审核完成</div>
				</div>
				<div class="stepIco stepIco4" id="cancel">4
					<div class="stepText" id="cancelText">未通过</div>
				</div>
				<div class="stepIco stepIco5" id="huifucomplete">5
					<div class="stepText" id="huifucompleteText">回复完成</div>
				</div>
			</div>
		<div class="container">
		<!-- main框架顶部 -->	
		<!-- 订单详情列表表单 -->
			<div id="tanchu1" style="border:4px solid #999; background-color:#FFF;" >
				<div style="line-height:25px;  font-size:16px;padding-left:40px;padding-bottom:10px;padding-top:10px;">
				
					评论状态：（<font color="red">
									<switch name="vo.review">    
										<case value="2">待审核</case>    
										<case value="1">已审核</case>
										<case value="3">未通过</case>
										<case value="4">已回复</case>
									</switch></font>）
					<br/>评论时间：<{$vo.add_time|date="Y-m-d H:i:s",###}>
					<br/>评论会员：<{$vo.uname}>
					<br/>详细内容：<{$vo.content}>
					<switch name="vo.review">    
						<case value="1">
							<br>回复内容：<textarea name="huifu" rows="" cols="" id="huifu"></textarea>
						</case>
						<case value="4">
							<br>回复内容：<{$vo.huifu}>
						</case>
					</switch>
				</div>
			</div>
				<div style="float:right;line-height:25px; padding-left:60px;padding-bottom:10px;padding-top:10px;">
					<switch name="vo.review">    
						<case value="2">
							<button type="button" style="width:100px;margin-left:30px;border:none;font-size:16px;cursor:pointer;" name="queren" id="queren" data-id="<{$vo.id}>">审核通过</button>
							<button type="button" style="width:100px;margin-left:30px;border:none;font-size:16px;cursor:pointer;" name="quxiao" id="quxiao" data-id="<{$vo.id}>">取消通过</button>
						</case>    
						<case value="1">
							<button type="button" style="width:100px;margin-left:30px;border:none;font-size:16px;cursor:pointer;" name="hfu" id="huifu" data-id="<{$vo.id}>">回复</button>
							<button type="button" style="width:100px;margin-left:30px;border:none;font-size:16px;cursor:pointer;" name="quxiao" id="quxiao" data-id="<{$vo.id}>">取消通过</button>
						</case>
					</switch>
				</div>		  
		</div>
		
	</div>
	<script>

	function refresh(){
		window.location.reload();				 
	}
	
	$("[name=quxiao]").click(function(){
		var id = $(this).attr("data-id");
		$.get("<{:U('comQx')}>",{id:id},function(data){
			if(data.status){				
				$('.msg').text(data.msg);
				$('.msg').slideDown('fast');
				setTimeout(function(){$('.msg').slideUp('fast');},1600);
				
				}			
			},'json');
			refresh();
		});
	
	$("[name=queren]").click(function(){
		var id = $(this).attr("data-id");
		$.get("<{:U('comQr')}>",{id:id},function(data){
			if(data.status){				
				$('.msg').text(data.msg);
				$('.msg').slideDown('fast');
				setTimeout(function(){$('.msg').slideUp('fast');},1600);
				
				}			
			},'json');
			refresh();
		});


	$("[name=hfu]").click(function(){
		var id = $(this).attr("data-id");
		var huifu = $("#huifu").val();
		$.get("<{:U('comHf')}>",{id:id,huifu:huifu},function(data){
			if(data.status){				
				$('.msg').text(data.msg);
				$('.msg').slideDown('fast');
				setTimeout(function(){$('.msg').slideUp('fast');},1600);				
				}			
			},'json');
			refresh();
		});
	
	</script>
</body>
<html>

